﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BuzzwordBingo.Interface
{
    /// <summary>
    /// Bingo event definition
    /// </summary>
    public interface IBingoEvent
    {
        /// <summary>
        /// Start datetime
        /// </summary>
        DateTime StartDate { get; set; }

        /// <summary>
        /// End datetime
        /// </summary>
        DateTime EndDate { get; set; }

        /// <summary>
        /// Event speaker
        /// </summary>
        string Speaker { get; set; }

        /// <summary>
        /// Event organiser
        /// </summary>
        string Organiser { get; set; }

        /// <summary>
        /// Buzzword category
        /// </summary>
        IBuzzwordCategory Category { get; set; }

        /// <summary>
        /// Participants list
        /// </summary>
        IList<IParticipant> ParticipantList { get; set; }

        /// <summary>
        /// Persistence id
        /// </summary>
        int GetId { get; }


        /// <summary>
        /// Fire 'Bingo' when a participant wins 
        /// </summary>
        event EventHandler Bingo;

        /// <summary>
        /// Add event dates
        /// </summary>
        /// <param name="Start">start datetime</param>
        /// <param name="End">end datetime</param>
        void AddEventDates(DateTime Start, DateTime End);

        /// <summary>
        /// Add a buzz word
        /// </summary>
        /// <param name="NewBuzzWord">new buzz word</param>
        void AddBuzzWord(IBuzzWord NewBuzzWord);

        /// <summary>
        /// Add a participant to the event
        /// </summary>
        /// <param name="NewParticipant">new participant</param>
        void AddParticipant(IParticipant NewParticipant);

        /// <summary>
        /// Create a bingo card for a participant
        /// </summary>
        /// <param name="ForParticipant">participant</param>
        void CreateBingoCard(IParticipant ForParticipant);

        /// <summary>
        /// Mark a buzzword as set
        /// </summary>
        /// <param name="OfParticipant">participant</param>
        /// <param name="Index">buzzword index [0-24]</param>
        void MarkBuzzWord(IParticipant OfParticipant, int Index);

        /// <summary>
        /// Get bingo card of a participant
        /// </summary>
        /// <param name="OfParticipant">participant</param>
        /// <returns>bingo card</returns>
        IBingoCard GetBingoCard(IParticipant OfParticipant);

        /// <summary>
        /// Returns the winner of the event
        /// </summary>
        /// <returns>participant winner</returns>
        IParticipant GetWinner();
    }
}
